package com.example.im.bean

import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import java.io.Serializable

@Entity(indices = [Index(value = ["account"], unique = true)])
class UserRoom : Serializable {

    @PrimaryKey(autoGenerate = true)
    var id: Int = 0
    @ColumnInfo(name = "jid")
    var jid: String? = null
    @ColumnInfo(name = "account")
    var account: String? = null
    @ColumnInfo(name = "nick_name")
    var nickname: String? = null//
    @ColumnInfo(name = "type")
    var type: Int = 0
    @ColumnInfo(name = "sub")
    var sub: Int = -1

    fun getUserRoom(): UserRoom = this

    companion object {
        private const val serialVersionUID = 42L
    }
}
